package com.cloudkinto.service.storage;

import com.baomidou.mybatisplus.extension.service.IService;
import com.cloudkinto.bo.storage.*;
import com.cloudkinto.common.web.PageResult;
import com.cloudkinto.common.web.SingleResult;
import com.cloudkinto.entity.StorageLocationDo;
import com.cloudkinto.vo.common.CommonBatchOperationVo;
import com.cloudkinto.vo.storage.CellAvailableVo;
import com.cloudkinto.vo.storage.LocationRes;
import com.cloudkinto.vo.storage.StorageLocationVo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 库位表 service接口
 * </p>
 *
 * @author long
 * @since 2024-11-12
 */
public interface StorageLocationService extends IService<StorageLocationDo> {


    void add(StorageLocationAddBo req, Long tenantId);

    void update(StorageLocationUpdateBo updateVo, Long userId);

    CommonBatchOperationVo delete(List<Long> ids);

    StorageLocationDo detail(Long id);

    SingleResult<Map<String, Object>> pageInit(Long tenantId, Long whId);

    PageResult<StorageLocationVo> getListPage(StorageLocationQueryBo bo);

    CommonBatchOperationVo importAdd(StorageImportBo bo, Long tenantId);

    CommonBatchOperationVo importUpdate(StorageImportBo bo, Long tenantId);

    void export(List<Long> ids, Long tenantId, HttpServletResponse response) throws IOException;

    List<CellAvailableVo> getCellAvailableByProductId(CellAvailableBySkuQueryBo bo);

    List<CellAvailableVo> getCellAvailableByBox(CellAvailableByBoxQueryBo bo);

    LocationRes getPickingRecommendRack(int stockAttribute, Long whId);
}
